tools/libxl: Plumb a restore boolean into libxl__domain_build_state
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 24 Jan 2020 17:52:52 +0000 (17:52 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 5 May 2020 19:18:19 +0000 (20:18 +0100)
commit779efdbb502b38c66b774b124fa0ceed254875bd
tree5b36f1fd16386e6defb0622bf58f5672f8e67ac4
parent77c82949990edaf21130be842a289a7fb7a439e1
tools/libxl: Plumb a restore boolean into libxl__domain_build_state

To fix CPUID handling, libxl__build_pre() is going to have to distinguish
between a brand new VM vs one which is being migrated-in/resumed.

Transcribe dcs->restore_fd into dbs->restore in initiate_domain_create()
only (specifically avoiding the stubdom state in libxl__spawn_stub_dm()).

While tweaking initiate_domain_create(), make a new dbs alias and simplify
later code, and drop the local restore_fd alias as the new dbs->restore is
more intuitive in context.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_create.c
tools/libxl/libxl_internal.h